import { request } from '@/utils/request.js'; //导入封装好的js文件
// 发送芽号申请关联
export const sendShowIdApi = (data) => {
  return request({
    url: '/my/auth/sendShowId',
    method: 'post',
    data,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });
};
// 获取芽号授权申请
export const authReceiveApi = () => {
  return request({
    url: '/my/auth/receive',
    method: 'get'
  });
};
// 确认芽号授权申请
export const authConfirmApi = () => {
  return request({
    url: '/my/auth/confirm',
    method: 'get'
  });
};

// 获取用户信息
export const getUserInfoApi = () => {
  return request({
    url: '/my/info',
    method: 'get'
  });
};

// 更新用户个性签名
export const updateBIOApi = (data) => {
  return request({
    url: '/my/updateBIO',
    method: 'post',
    data: data,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });
};

// 学生(孩子)列表
export const studentListApi = () => {
  return request({
    url: `/my/student/list`,
    method: 'get'
  });
};
// 通过芽号搜索学生信息
export const searchByShowIdApi = (data) => {
  return request({
    url: '/student/searchByShowId',
    method: 'get',
    data
  });
};
// 新增学生(孩子)信息
export const addStudentApi = (data) => {
  return request({
    url: '/student/addStudent',
    method: 'post',
    data
  });
};
// 新增学生(孩子)信息
export const updateAvatarApi = (data) => {
  return request({
    url: '/user/avatar',
    method: 'post',
    data
  });
};
// 新增学生(孩子)信息
export const updateNicknameApi = (data) => {
  return request({
    url: '/my/updateNickname',
    method: 'post',
    data: data,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });
};
// 新增学生(孩子)信息
export const getMyPointApi = (userId) => {
  return request({
    url: `/points/my`,
    method: 'get'
  });
};
// 报表
export const getReportDataApi = (data) => {
  return request({
    url: `/ai/workflow/execute`,
    method: 'post',
    data
  });
};
